{include file="public/header"/}
<div id="container" style="background-color: #fff;padding: 16px;">
    <div class="front">
        <div class="my-setting">
                <div class="head">
                    <div class="title">
                        部署网页组件（推荐）：网页咨询组件同时支持桌面网站和移动网站，提供强大的用户行为采集能力和系统对接能力
                    </div>
                   
                </div>
                <br />
                <div class="contents">
                    聊天框样式：
                    <select name="type" id="type" onchange="swith()" style="margin-left:20px;padding: 3px;font-size: 14px;border-radius: 15px;border: 1px solid #e5e3e9;height: 32px;">
                            <option value="0" selected>标准窗口</option>
                            <option value="1">迷你窗口</option>
                            <option value="2">自定义窗口</option>

                    </select>

                    <button class="layui-btn layui-btn-normal" onclick="build()">生成js</button>

                    <button id="tanchuang" class="layui-btn layui-btn-normal" onclick="show2()" style="margin-left:10px">生成居中弹窗</button>
                    <button id="xuanfu" class="layui-btn layui-btn-normal" onclick="show3()" style="margin-left:10px">生成靠右悬浮</button>
                    <button id="xiaochuangkou" class="layui-btn layui-btn-normal" onclick="show4()" style="margin-left:10px">生成小窗口</button>

                    <button id="bulidhtml" class="layui-btn layui-btn-normal" onclick="show()" style="margin-left:10px
">生成html</button>
                    <button id="buildwechat" class="layui-btn layui-btn-normal" style="margin-left:10px
" onclick="buildmp()">生成微信公众号链接</button>
                    <button id="buildpersonal" class="layui-btn layui-btn-normal" style="margin-left:10px
" onclick="buildpersonal()">生成我的专属链接</button>
                    {:hook('generatelinkhook', ['id'=>1])}
                </div>
            <br/>
            <div class="layui-card" style="background-color: #F3F3F3;" id="diy-kf-site">
                <div class="layui-card-header">自定义设置(请设置好再点击生成)</div>
                <div class="layui-card-body">
                    <form class="layui-form" id="form-diy">
                        <div class="layui-form-item">
                            <label class="layui-form-label" style="width: 120px">开启弹窗</label>
                            <div class="layui-input-inline">
                                <input type="checkbox" checked name="isopen" lay-skin="switch" lay-filter="switchTest" lay-text="开|关">
                            </div>
                            <div class="layui-form-mid layui-word-aux">只对自定义窗口生成js有效</div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label" style="width: 120px">弹窗延时</label>
                            <div class="layui-input-inline">
                                <input type="text" name="open_delay" placeholder="聊天窗口延时时间" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">单位秒，开启弹窗有效（只对自定义窗口生成js有效）</div>
                        </div>
                        <div class="layui-form-item">
                        <label class="layui-form-label" style="width: 120px">弹窗高度</label>
                        <div class="layui-input-inline">
                            <input type="text" name="m_height" placeholder="聊天窗口弹窗高度" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux">单位像素，只针对手机端有效（只对自定义窗口生成js有效）</div>
                    </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label" style="width: 120px">悬浮条背景色</label>
                            <div class="layui-input-inline">
                                <input type="hidden" name="m_kfbtbg" placeholder="请选择颜色" class="layui-input" id="m_kfbtbg" value="#05202d">
                            </div>
                            <div class="layui-inline">
                                <div id="test-form"></div>
                            </div>
                            <div class="layui-inline">
                                <div class="layui-form-mid layui-word-aux">客服悬浮条背景色</div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label" style="width: 120px">主题颜色</label>
                            <div class="layui-input-inline">
                                <input type="hidden" name="theme" placeholder="请选择颜色" class="layui-input" id="theme" value="#05202d">
                            </div>
                            <div class="layui-inline">
                                <div id="test-form-theme"></div>
                            </div>
                            <div class="layui-inline">
                                <div class="layui-form-mid layui-word-aux">聊天窗口主题色</div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>

               <div class="method" style="height:440px; overflow:auto;">
                      <div id="codearea" class="hide">
                          <pre id="wechat-mp" class="copy-js-content hide layui-code" readonly="" style="padding-bottom: 2em;">
                          </pre>
                          <pre id="tc01" class="copy-js-content hide" readonly="">
                              <div style="width:1034px; text-align:center; border-bottom:1px solid #456; float:left; padding-bottom:20px;">
                                  <img src="{$action}/zxkf/kfbl/img/zjxf.png" style="width:30%;" alt="图片">
                              </div>
                              <div style="clear:both; color:#F00;">
                                    &lt;script&gt;<br />
                                    function kf_getPopupDivHtml(kfguin,reference,companyname,welcomeword)<br />
                                    &nbsp; {<br />
                                    &nbsp; &nbsp; var temp = '';<br />
                                    &nbsp; &nbsp; temp += '&lt;div style="-moz-user-select:none; -webkit-user-select:none; user-select:none;&nbsp; float: left;height: 150px;position:relative;width: 8px;background-image: url({$action}/zxkf/kfbl/kfimages/bg_1.png);"&gt;&lt;/div&gt;';<br />
                                    &nbsp; &nbsp; temp += '&lt;div style="-moz-user-select:none; -webkit-user-select:none; user-select:none; font-family: Tahoma; text-align:left;float: left;height: 150px;width: 324px;background-image: url({$action}/zxkf/kfbl/kfimages/bg_2.gif);background-repeat: repeat-x;"&gt;';<br />
                                    &nbsp; &nbsp; temp += '&lt;div&gt;&lt;h1 style="-moz-user-select:none; -webkit-user-select:none; user-select:none; float:left;font-size: 16px;color: #FFFFFF;margin: 0px;padding: 6px 0 13px 2px;line-height:17px;"&gt;'+companyname+'&lt;/h1&gt;&lt;a href="#" onclick="kf_hidekfpopup();return false;" style="-moz-user-select:none; -webkit-user-select:none; user-select:none; background-image: url({$action}/zxkf/kfbl/kfimages/close.gif);float: right;height: 19px;width: 42px;" onmouseover="javascript:this.style.backgroundPosition=\'bottom\'" onmouseleave="javascript:this.style.backgroundPosition=\'top\'"&gt;&lt;/a&gt;&lt;/div&gt;';<br />
                                    &nbsp; &nbsp; temp += '&lt;div style="-moz-user-select:none; -webkit-user-select:none; user-select:none; height:83px;padding: 0 0 0 2px;clear:both;"&gt;';<br />
                                    &nbsp; &nbsp; temp += '&lt;div style="-moz-user-select:none; -webkit-user-select:none; user-select:none; border-radius:10px; background-image: url({$action}/zxkf/kfbl/kfimages/kf74.png); background-size:100% 100%; width:74px; height: 74px;float:left;"&gt;&lt;/div&gt;';<br />
                                    &nbsp; &nbsp; temp += '&lt;b style="-moz-user-select:none; -webkit-user-select:none; user-select:none; font-family:Tahoma;font-size:14px;line-height:24px;width: 220px;margin:0px;padding: 0 0 0 12px;display:block;float:left;margin-top:2px;word-wrap:break-word;"&gt;'+welcomeword+'&lt;/b&gt;&lt;/div&gt;';<br />
                                    &nbsp; &nbsp; temp += '&lt;div style="clear: both;"&gt;';<br />
                                    &nbsp; &nbsp; temp += '&lt;a onclick="kf_hidekfpopup();return false;" href="#" style="-moz-user-select:none; -webkit-user-select:none; user-select:none; float:right;background-image: url({$action}/zxkf/kfbl/kfimages/btn_1.gif);margin: 5px 0 0 5px;padding: 0px;border:0px;height: 21px;width: 69px;"&gt;&lt;/a&gt;';<br />
                                    &nbsp; &nbsp; temp += '&lt;a href="javascript:;" onclick="blzx.connenct(0)" style="-moz-user-select:none; -webkit-user-select:none; user-select:none; float:right;background-image: url({$action}/zxkf/kfbl/kfimages/btn_2.gif);margin: 5px 0 0 0;padding: 0px;border:0px;height: 21px;width: 69px;"&gt;&lt;/a&gt;&lt;/div&gt;';<br />
                                    &nbsp; &nbsp; temp += '&lt;/div&gt;&lt;div style="-moz-user-select:none; -webkit-user-select:none; user-select:none; float: left;height: 150px;width: 8px;background-image: url({$action}/zxkf/kfbl/kfimages/bg_1.png);background-position: right;"&gt;&lt;/div&gt;';<br />
                                    &nbsp; &nbsp; return temp;<br />
                                    &nbsp; }<br />
                                    &lt;/script&gt;<br />
                                    <br />
                                    &lt;script type="text/javascript"&gt;<br />
                                    var head = document.getElementsByTagName('head')[0];<br />
                                    var link = document.createElement('link');<br />
                                    &nbsp; &nbsp; link.type='text/css';<br />
                                    &nbsp; &nbsp; link.rel = 'stylesheet';<br />
                                    &nbsp; &nbsp; link.href ='{$action}/assets/css/index/ymwl_online.css';<br />
                                    &nbsp; &nbsp; head.appendChild(link);<br />
                                    var script = document.createElement('script');<br />
                                    &nbsp; &nbsp; script.type='text/javascript';<br />
                                    &nbsp; &nbsp; script.src ='{$action}/assets/js/js.cookie.min.js';<br />
                                    &nbsp; &nbsp; head.appendChild(script);&nbsp;<br />
                                    &nbsp; &nbsp; &nbsp;var blzx={};<br />
                                    window.addEventListener('load', function(){<br />
                                    blzx ={<br />
                                    &nbsp; &nbsp; visiter_id:(typeof ymwl=='undefined' || typeof ymwl.visiter_id == 'undefined')?'':ymwl.visiter_id,<br />
                                    &nbsp; &nbsp; &nbsp;visiter_name:(typeof ymwl=='undefined' || typeof ymwl.visiter_name == 'undefined')?'':ymwl.visiter_name,<br />
                                    &nbsp; &nbsp; &nbsp;avatar:(typeof ymwl=='undefined' || typeof ymwl.avatar == 'undefined')?'':ymwl.avatar,<br />
                                    &nbsp; &nbsp; &nbsp;product:(typeof ymwl=='undefined' || typeof ymwl.product == 'undefined')?'{}':ymwl.product,<br />
                                    &nbsp; &nbsp; &nbsp;open:function(){<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; var d =document.getElementById('wolive-box');<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; if(!d){<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var div =document.createElement('div');<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; div.id ="ymwl-kefu";<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; div.className +='ymwl-form';<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; div.style.backgroundColor='#05202d'<br />
                                    
                                    &nbsp; &nbsp; &nbsp; &nbsp; }<br />
                                    &nbsp; &nbsp; &nbsp;},<br />
                                    &nbsp; &nbsp; &nbsp;connenct:function(groupid){<br />
                                    &nbsp; &nbsp; &nbsp; var id =groupid;<br />
                                    &nbsp; &nbsp; &nbsp; var web =encodeURI('{$action}/layer?theme=05202d&amp;visiter_id='+blzx.visiter_id+'&amp;visiter_name='+blzx.visiter_name+'&amp;avatar='+blzx.avatar+'&amp;business_id={$login['business_id']}&amp;groupid='+groupid+'&amp;product='+blzx.product);<br />
                                    &nbsp; &nbsp; &nbsp; var moblieweb = encodeURI('{$action}/mobile/index/home?theme=05202d&amp;visiter_id='+blzx.visiter_id+'&amp;visiter_name='+blzx.visiter_name+'&amp;avatar='+blzx.avatar+'&amp;business_id={$login['business_id']}&amp;groupid='+groupid+'&amp;product='+blzx.product);<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp;var s =document.getElementById('wolive-talk');<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp;if(!s){<br />
                                    <br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var div = document.createElement('div');<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; div.id ="wolive-talk";<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; div.name=id;<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(blzx.isMobile()){<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;div.style.width='100%';<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;div.style.bottom=0;<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;div.style.right=0;<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;div.style.left=0;<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;div.style.height='500px'; /*弹出的高度*/<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; div.style.backgroundColor='#05202d'<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.body.appendChild(div);<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; div.innerHTML='&lt;i class="ymwl-close" onclick="blzx.narrow()"&gt;&lt;/i&gt;&lt;iframe id="wolive-iframe" src="'+web+'"&gt;&lt;/iframe&gt;';<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; }else{<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var title =s.name;<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(title == groupid){<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; s.style.display ='block';<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }else{<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; s.parentNode.removeChild(s);<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; blzx.connenct(groupid);&nbsp;<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; }<br />
                                    &nbsp; &nbsp; &nbsp;},<br />
                                    &nbsp; &nbsp; &nbsp;narrow:function(){<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; document.getElementById('wolive-talk').style.display="none";<br />
                                    &nbsp; &nbsp; &nbsp;},isMobile:function(){<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) {<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return true;<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; }else{<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return false;<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; }<br />
                                    &nbsp; &nbsp; }<br />
                                    }<br />
                                    blzx.open();<br />
                                    });<br />
                                    &lt;/script&gt;<br />
                                    <br />
                                    &lt;script type=text/javascript&gt;&nbsp; &nbsp; &nbsp;&nbsp;<br />
                                    &nbsp; &nbsp; &nbsp;kfguin="3";<br />
                                    &nbsp; &nbsp; &nbsp;ws="";<br />
                                    &nbsp; &nbsp; &nbsp;companyname="在线客服";<br />
                                    &nbsp; &nbsp; &nbsp;welcomeword="您好,欢迎光临开发部落科技&lt;brT&gt;请问,有什么可以帮到您的吗?"; type="1";<br />
                                    &lt;/script&gt;<br />
                                    &lt;script type="text/javascript" src="{$action}/zxkf/kfbl/js/kf.js"&gt;&lt;/script&gt;
                              </div>
                          </pre>
                          <pre id="xf01" class="copy-js-content hide" readonly="">
                              <div style="width:1034px; text-align:center; border-bottom:1px solid #456; float:left; padding-bottom:20px;">
                                  <img src="{$action}/zxkf/kfbl/img/ybxf.png" style="width:15%;" alt="图片">
                              </div>
                              <div style="clear:both; color:#F00;">
                                    &lt;link rel="stylesheet" type="text/css" href="{$action}/zxkf/kfbl/static/css/style2.css"/&gt;<br />
                                    &lt;div style="clear:both; color:#F00;"&gt;<br />
                                    &nbsp; &lt;div class="side" style="z-index:9999;"&gt;<br />
                                    &nbsp; &nbsp; &lt;ul&gt;<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &lt;li class="sideewm"&gt;&lt;i class="bgs3"&gt;&lt;/i&gt;官方微信<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div class="ewBox son"&gt;&lt;img src="{$action}/zxkf/kfbl/static/images/leftewm.jpg" alt="官方微信"/&gt;&lt;/div&gt;<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &lt;/li&gt;<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &lt;li id="qqonline"&gt;&lt;a href="http://wpa.qq.com/msgrd?v=3&amp;uin=1722955042&amp;site=qq&amp;menu=yes"&gt;&lt;i class="bgs1"&gt;&lt;/i&gt;QQ咨询&lt;/a&gt;<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &lt;/li&gt;<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &lt;li class="shangqiao"&gt;&lt;a<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; href="{$action}/index/index/home?theme=05202d&amp;visiter_id=&amp;visiter_name=&amp;avatar=&amp;business_id={$login['business_id']}&amp;groupid=0"<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; target="_blank" rel="nofollow"&gt;<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div&gt;&lt;i class="bgs2"&gt;&lt;/i&gt;在线咨询&lt;/div&gt;<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &lt;/a&gt;&lt;/li&gt;<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &lt;li class="sideetel"&gt;&lt;i class="bgs4"&gt;&lt;/i&gt;联系电话<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div class="telBox son"&gt;<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;dd class="bgs1"&gt;&lt;span&gt;座机&lt;/span&gt;400-8399158&lt;/dd&gt;<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;dd class="bgs2"&gt;&lt;span&gt;手机&lt;/span&gt;15348692659&lt;/dd&gt;<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/div&gt;<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &lt;/li&gt;<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &lt;li id="yuyueshow"&gt;&lt;a href="#gywm"&gt;&lt;i class="bgs5"&gt;&lt;/i&gt;关于我们&lt;/a&gt;&lt;/li&gt;<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; &lt;li class="sidetop" onClick="goTop()"&gt;&lt;i class="bgs6"&gt;&lt;/i&gt;返回顶部&lt;/li&gt;<br />
                                    &nbsp; &nbsp; &lt;/ul&gt;<br />
                                    &lt;/div&gt;<br />
                                    &lt;script src="{$action}/zxkf/kfbl/static/js/jquery-1.11.0.js" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt;<br />
                                    &lt;script&gt;&nbsp; &nbsp;function goTop() {<br />
                                    &nbsp; &nbsp; $('html,body').animate({<br />
                                    &nbsp; &nbsp; &nbsp; &nbsp; scrollTop: 0<br />
                                    &nbsp; &nbsp; }, 500)<br />
                                    }<br />
                                    &lt;/script&gt;<br />
                              </div>
                          </pre>
                          <pre id="xck01" class="copy-js-content hide" readonly="">
                              <div style="width:1034px; text-align:center; border-bottom:1px solid #456; float:left; padding-bottom:20px;">
                                  <img src="{$action}/zxkf/kfbl/img/xck.png" style="width:30%;" alt="图片">
                              </div>
                              <div style="clear:both; color:#F00;">
                                &lt;link rel="stylesheet" type="text/css" href="{$action}/zxkf/kfbl/static/css/style2.css" /&gt;<br />
                                &lt;a href="javascript:;" onclick="blzx.connenct(0)" style="display:block;"&gt;&nbsp; &nbsp;<br />
                                <span> </span>&lt;div class="sav002"&gt;&nbsp; &nbsp; &nbsp;<br />
                                <span> </span>&lt;div class="kfs002"&gt;<br />
                                <span> </span>&lt;img src="{$action}/zxkf/kfbl/images/avatar-admin.png" alt="在线客服"&gt;&lt;/div&gt;&nbsp; &nbsp; &nbsp;<br />
                                <span> </span>&lt;div class="zx002"&gt;在线客服&lt;/div&gt;&nbsp; &nbsp; &nbsp;<br />
                                <span> </span>&lt;div class="right002"&gt;<br />
                                <span> </span>&lt;img src="{$action}/zxkf/kfbl/images/zx4.gif" style="float:left;" alt="在线客服"/&gt;<br />
                                <span> </span>&lt;/div&gt;&nbsp;<br />
                                <span> </span>&lt;/div&gt;&nbsp;<br />
                                &lt;/a&gt;&nbsp;<br />
                                &lt;script&gt; var head = document.getElementsByTagName('head')[0];<br />
                                &nbsp;var link = document.createElement('link');<br />
                                &nbsp; &nbsp; &nbsp;link.type='text/css';<br />
                                &nbsp; &nbsp; &nbsp;link.rel = 'stylesheet';<br />
                                &nbsp; &nbsp; &nbsp;link.href ='{$action}/assets/style1/css/chatStyle.css';<br />
                                &nbsp; &nbsp; &nbsp;head.appendChild(link);<br />
                                <br />
                                &nbsp;var blzx ={<br />
                                &nbsp;visiter_id:(typeof ymwl=='undefined' || typeof ymwl.visiter_id == 'undefined')?'':ymwl.visiter_id,<br />
                                &nbsp; &nbsp; &nbsp; visiter_name:(typeof ymwl=='undefined' || typeof ymwl.visiter_name == 'undefined')?'':ymwl.visiter_name,<br />
                                &nbsp; &nbsp; &nbsp; avatar:(typeof ymwl=='undefined' || typeof ymwl.avatar == 'undefined')?'':ymwl.avatar,<br />
                                &nbsp; &nbsp; &nbsp; product:(typeof ymwl=='undefined' || typeof ymwl.product == 'undefined')?'{}':ymwl.product,<br />
                                &nbsp; &nbsp; &nbsp; open:function(){<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var d =document.getElementById('blzxMinChatWindowDiv');<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(!d){<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var div =document.createElement('div');<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;div.id ="blzxMinChatWindowDiv";<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;document.body.appendChild(div);<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var w =document.getElementById('blzxMinChatWindowDiv');<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;w.innerHTML='&lt;div id="minblzxmsgtitlecontainer" style="display:none;"&gt;&lt;img id="minblzxWinlogo" src="{$action}/assets/style1/img/wechatLogo.png"&gt;&lt;div id="minblzxmsgtitlecontainerlabel" onclick="blzx.connenct(0)"&gt;在线咨询&lt;/div&gt;&lt;img id="minblzxmsgtitlecontainerclosebutton" onclick="blzx.closeMinChatWindow(\'blzxMinChatWindowDiv\');" src="{$action}/assets/style1/img/closewin.png"&gt;&lt;img id="minblzxNewBigWin" onclick="blzx.connenct(0)" src="{$action}/assets/style1/img/up_arrow.png"&gt;&lt;/div&gt;';<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;document.getElementById('minblzxmsgtitlecontainer').style.backgroundColor='#7fa014';<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />
                                &nbsp; &nbsp; &nbsp; },<br />
                                &nbsp; &nbsp; &nbsp; connenct:function(groupid){<br />
                                &nbsp; &nbsp; &nbsp; document.getElementById('blzxMinChatWindowDiv').style.display="none";<br />
                                &nbsp; &nbsp; &nbsp; &nbsp;var id =groupid;<br />
                                &nbsp; &nbsp; &nbsp; &nbsp;var web =encodeURI('{$action}/layer?theme=05202d&amp;visiter_id='+blzx.visiter_id+'&amp;visiter_name='+blzx.visiter_name+'&amp;avatar='+blzx.avatar+'&amp;business_id={$login['business_id']}&amp;groupid='+groupid+'&amp;product='+blzx.product); /*05202d 这是颜色 可以自由换*/<br />
                                &nbsp; &nbsp; &nbsp; &nbsp;<br />
                                &nbsp; &nbsp; &nbsp; &nbsp;var moblieweb = encodeURI('{$action}/mobile/index/home?theme=05202d&amp;visiter_id='+blzx.visiter_id+'&amp;visiter_name='+blzx.visiter_name+'&amp;avatar='+blzx.avatar+'&amp;business_id={$login['business_id']}&amp;groupid='+groupid+'&amp;product='+blzx.product); /*05202d 这是颜色 可以自由换*/<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; var s =document.getElementById('wolive-talk');<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; if(!s){<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var div = document.createElement('div');<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;div.id ="wolive-talk";<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;div.name=id;<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(blzx.isMobile()){<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; div.style.width='100%';<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; div.style.height='500px'; /*弹窗高度 px像素*/<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;document.body.appendChild(div);<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;div.innerHTML='&lt;i class="blzx-close" onclick="blzx.closeMinChatWindow(\'wolive-talk\')"&gt;&lt;/i&gt;&lt;iframe id="wolive-iframe" src="'+web+'"&gt;&lt;/iframe&gt;'<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}else{<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var title =s.name;<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(title == groupid){<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;s.style.display ='block';<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}else{<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;s.parentNode.removeChild(s);<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;blzx.connenct(groupid);&nbsp;<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />
                                &nbsp; &nbsp; &nbsp; },closeMinChatWindow:function(id){<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;document.getElementById(id).style.display="none";<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(id==='wolive-talk'){<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;document.getElementById('blzxMinChatWindowDiv').style.display="none";<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />
                                &nbsp; &nbsp; &nbsp;},isMobile:function(){<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) {<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return true;<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}else{<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return false;<br />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />
                                &nbsp; &nbsp; &nbsp;}<br />
                                &nbsp;}<br />
                                <br />
                                &nbsp;window.onload =blzx.open();<br />
                                &nbsp;setTimeout(function () {<br />
                                &nbsp; &nbsp; &nbsp;blzx.connenct(0);<br />
                                &nbsp;},2000); /*弹窗时间 1000/秒*/<br />
                                &lt;/script&gt;
                              </div>
                          </pre>

                          <pre id="personal" class="copy-js-content hide" readonly="" style="padding-bottom: 2em;">
                              <span style="color: red">我的专属链接(将二维码保存下来，进行推广，客户通过微信扫码即可和客服聊天):</span><p></p>
<div class="qrcode_wrap_zs"></div>

                          </pre>
                        <pre id="wolive-js" class="copy-js-content" readonly>
                            部署如下代码
                            <div class="layui-code">

                            </div>
                        </pre>
                        <pre id="frontjs" class="copy-js-content hide" style="height: 250px">
                            部署如下代码
                            <div class="layui-code">
                            </div>
                     </pre>
                     <pre id="minjs" class="copy-js-content hide" style="height: 280px;color:red;">
                        如果需要添加自身网站用户数据，请部署到上面代码之前，按注释要求添加：
                         <div class="layui-code">
                              &lt;script type="text/javascript">
                            &nbsp;&nbsp;var ymwl={};
                            &nbsp;&nbsp;ymwl.visiter_id='';//访客id
                            &nbsp;&nbsp;ymwl.visiter_name='';//访客昵称
                            &nbsp;&nbsp;ymwl.avatar='';//访客头像绝对路径
                            &nbsp;&nbsp;ymwl.product='{}';//json数据字符串
                            &lt;/script>
                         </div>
                        /**
                        格式如下：
                            {"pid":1,"title":" Apple MacBook Air ","img":"http://www.domain.com/assets/images/pro.jpg","info":"13.3英寸笔记本电脑 银色(2017款Core i5 处理器/8GB内存/128GB闪存 MQD32CH/A)","price":"￥7588.00","url":"http://www.domain.com/demo/index/product1"}
                         */
                     </pre>
                   
                    </div>
               </div>        
        </div>
    </div>

</div>
<div id="demo"></div>
<script type="text/javascript" src="/assets/js/arale-qrcode.js"></script>
<script>
    layui.use(['form','code','colorpicker'], function(){
        var form = layui.form,colorpicker = layui.colorpicker;
        //各种基于事件的操作，下面会有进一步介绍
        colorpicker.render({
            elem: '#test-form'
            ,color: '#05202d'
            ,done: function(color){
                $('#m_kfbtbg').val(color);
            }
        });
        colorpicker.render({
            elem: '#test-form-theme'
            ,color: '#05202d'
            ,done: function(color){
                $('#theme').val(color);
            }
        });
    });
var swith=function(){

    $type =$("#type").val();
    if($type == 0){
     $("#bulidhtml").removeClass('hide');
     $("#codearea").addClass('hide');
        // $("#diy-kf-site").addClass('hide');
     $("#wolive-js").addClass('hide');
     $("#frontjs").addClass('hide');
     $("#ymwl-kefu").remove();
     $('#buildwechat').removeClass('hide');
     $('#buildpersonal').removeClass('hide');
     $("#tanchuang").removeClass('hide');
     $("#tanchuang").removeClass('hide');
     $("#xuanfu").removeClass('hide');
     $("#xiaochuangkou").removeClass('hide');
     $("#tc01").addClass('hide');
     $("#xck01").addClass('hide');
     $("#xf01").addClass('hide');
     
    }else if($type == 1){
     $("#bulidhtml").addClass('hide');
        // $("#diy-kf-site").addClass('hide');
     $("#codearea").addClass('hide');
     $("#wolive-js").addClass('hide');
     $('#minjs').addClass('hide');
     $("#ymwl-kefu").remove();
     $('#buildwechat').addClass('hide');
     $('#buildpersonal').addClass('hide');
     $("#tanchuang").addClass('hide');
     $("#xuanfu").addClass('hide');
     $("#xiaochuangkou").addClass('hide');
     $("#tc01").addClass('hide');
     $("#xck01").addClass('hide');
     $("#xf01").addClass('hide');
     
    } else if($type == 2){
        $("#bulidhtml").addClass('hide');
        $("#codearea").addClass('hide');
        $("#wolive-js").addClass('hide');
        $('#minjs').addClass('hide');
        $("#ymwl-kefu").remove();
        // $("#diy-kf-site").removeClass('hide');
        $('#buildwechat').addClass('hide');
        $('#buildpersonal').addClass('hide');
        $("#tanchuang").addClass('hide');
        $("#xuanfu").addClass('hide');
        $("#xiaochuangkou").addClass('hide');
        $("#tc01").addClass('hide');
        $("#xck01").addClass('hide');
        $("#xf01").addClass('hide');
    }
}

var build =function(){
    $('#wechat-mp').addClass('hide');
    $("#wolive-js").removeClass('hide');
    $("#frontjs").removeClass('hide');
    $type =$("#type").val();
     if($type == 0 ){
        $("#frontjs").addClass('hide');
        $.ajax({
           url:YMWL_ROOT_URL+'/admin/set/createFrontjs',
           dataType:'json',
            data:$("#form-diy").serialize(),
           success:function(res){
            if(res.code == 0){
              layer.msg(res.msg,{icon:1,end:function(){
                $("#wolive-js").removeClass('hide');
                $("#codearea").removeClass('hide');
                $("#minjs").removeClass('hide');
                $("#tc01").addClass('hide');
                $("#xck01").addClass('hide');
                $("#xf01").addClass('hide');
                var str ='&lt;script src="'+res.data+'" charset="UTF-8">&lt;/script>';
                $("#wolive-js .layui-code").html(str);
                var newstr='<script src="'+res.data+'">';
                $('#ymwl-kefu').remove();
                $("#demo").html(newstr);
              }});
            }else{
              layer.msg(res.msg,{icon:2});
            }
           }
        });
     }else if($type == 1){
       $.ajax({
         url:YMWL_ROOT_URL+'/admin/set/createMinjs',
         dataType:'json',
           data:$("#form-diy").serialize(),
           type:"POST",   //请求方式
         success:function(res){
          if(res.code == 0){
            layer.msg(res.msg,{icon:1,end:function(){
              $("#wolive-js").removeClass('hide');
              $("#codearea").removeClass('hide');
              $("#frontjs").addClass('hide');
              $("#minjs").removeClass('hide');
              $("#tc01").addClass('hide');
              $("#xck01").addClass('hide');
              $("#xf01").addClass('hide');
              var str ='&lt;script src="'+res.data+'" charset="UTF-8"> &lt;/script>';
              $("#wolive-js .layui-code").html(str);
              layui.code({elem:'#wolive-js .layui-code',about: false});
              var newstr='<script src="'+res.data+'">';
              $('#ymwl-kefu').remove();
              $('#wolive-talk').remove();
              $("#demo").html(newstr);
            }});
          }else{
            layer.msg(res.msg,{icon:2});
          }
         }
       });
     }else if($type == 2){
         $.ajax({
             url:YMWL_ROOT_URL+'/admin/set/createMinDiyjs',
             dataType:'json',
             data:$("#form-diy").serialize(),
             type:"POST",   //请求方式
             success:function(res){
                 if(res.code == 0){
                     layer.msg(res.msg,{icon:1,end:function(){
                             $("#wolive-js").removeClass('hide');
                             $("#codearea").removeClass('hide');
                             $("#frontjs").addClass('hide');
                             $("#minjs").removeClass('hide');
                             var str ='&lt;script src="'+res.data+'" charset="UTF-8"> &lt;/script>';
                             $("#wolive-js .layui-code").html(str);
                             layui.code({elem:'#wolive-js .layui-code',about: false});
                             var newstr='<script src="'+res.data+'">';
                             $('#personal').remove();
                             $('#ymwl-kefu').remove();
                             $('#wolive-talk').remove();
                             $('#blzxMinChatWindowDiv').remove();
                             $("#demo").html(newstr);
                             $("#tc01").addClass('hide');
                             $("#xck01").addClass('hide');
                             $("#xf01").addClass('hide');

                         }});
                 }else{
                     layer.msg(res.msg,{icon:2});
                 }
             }
         });
     }
}
var domWechatMp=$('#wechat-mp');
var buildmp = function(){
    $type =$("#type").val();
    if($type == 0){
        $.ajax({
            url:"{:url('admin/set/createWechatUrl','',true,true)}",
            dataType:'json',
            data:$("#form-diy").serialize(),
            type:"POST",   //请求方式
            success:function(res){
                if(res.code == 0){
                    layer.msg(res.msg,{icon:1,end:function(){
                            $("#codearea").removeClass('hide');
                            $("#frontjs").addClass('hide');
                            $("#wolive-js").addClass('hide');
                            $("#minjs").addClass('hide');
                            $("#personal").addClass('hide');
                            domWechatMp.removeClass('hide');
                            domWechatMp.html(res.data);
                            $("#tc01").addClass('hide');
                            $("#xck01").addClass('hide');
                            $("#xf01").addClass('hide');
                        }});
                }else{
                    layer.msg(res.msg,{icon:2});
                }
            }
        });

    }
};
var domPersonal=$("#personal");
var buildpersonal = function () {
    $type =$("#type").val();
    if($type == 0){
        $("#codearea").removeClass('hide');
        $("#frontjs").addClass('hide');
        $("#wolive-js").addClass('hide');
        $("#minjs").addClass('hide');
        $('#wechat-mp').addClass('hide');
        $("#tc01").addClass('hide');
        $("#xck01").addClass('hide');
        $("#xf01").addClass('hide');
        var theme=$('#theme').val();
        theme=theme.replace("#","");
        domPersonal.removeClass('hide');
        var url="{$action}/index/index/home?business_id={$login['business_id']}&groupid={$login['groupid']}&special={$login['service_id']}&theme="+theme;
        domPersonal.find('p').text(url);
        qrnode = new AraleQRCode({
            render: 'canvas',
            correctLevel: 0,
            text: url,
            width: 150,
            height: 150,
            background: '#fff',
            foreground: '#000',
            image: "{$login.avatar}",
            imageSize: 55  /*二维码小图*/
        });
        domPersonal.find('.qrcode_wrap_zs').html(qrnode);

    }
};

var show =function(){
    $("#xck01").addClass('hide');
    $("#xf01").addClass('hide');
    $('#wechat-mp').addClass('hide');
    $('#personal').addClass('hide');
   $type =$("#type").val();
   if($type == 0){
       $.ajax({
           url:YMWL_ROOT_URL+'/admin/set/createHtml',
           dataType:'json',
           data:$("#form-diy").serialize(),
           type:"POST",   //请求方式
           success:function(res){
               if(res.code == 0){
                   layer.msg(res.msg,{icon:1,end:function(){
                           $("#codearea").removeClass('hide');
                           $("#wolive-js").addClass('hide');
                           $("#frontjs").removeClass('hide');
                           $("#minjs").addClass('hide');
                           $('#ymwl-kefu').remove();
                           $("#demo").html(res.data);
                           $("#frontjs .layui-code").text(res.data);
                           $("#xck01").addClass('hide');
                           $("#tc01").addClass('hide');
                           $("#xf01").addClass('hide');
                           layui.code({elem:'#frontjs .layui-code',about: false});
                       }});
               }else{
                   layer.msg(res.msg,{icon:2});
               }
           }
       });

   }
}
var show2 =function(){
    $("#xf01").addClass('hide');
    $("#xck01").addClass('hide');
    $('#wechat-mp').addClass('hide');
    $('#personal').addClass('hide');
    $("#tc01").addClass('hide');
   $type =$("#type").val();
   if($type == 0){
      $("#xf01").addClass('hide');
      $("#xck01").addClass('hide');
      $("#codearea").removeClass('hide');
      $("#wolive-js").addClass('hide');
      $("#frontjs").addClass('hide');
      $("#minjs").addClass('hide');
      $("#tc01").removeClass('hide');
   }
}

var show3 =function(){
    $("#tc01").addClass('hide');
    $("#xck01").addClass('hide');
    $('#wechat-mp').addClass('hide');
    $('#personal').addClass('hide');
    $("#xf01").addClass('hide');
   $type =$("#type").val();
   if($type == 0){
      $("#tc01").addClass('hide');
      $("#xck01").addClass('hide');
      $("#codearea").removeClass('hide');
      $("#wolive-js").addClass('hide');
      $("#frontjs").addClass('hide');
      $("#minjs").addClass('hide');
      $("#xf01").removeClass('hide');
   }
}

var show4 =function(){
    $("#tc01").addClass('hide');
    $("#xf01").addClass('hide');
    $('#wechat-mp').addClass('hide');
    $('#personal').addClass('hide');
    $("#xck01").addClass('hide');
   $type =$("#type").val();
   if($type == 0){
      $("#tc01").addClass('hide');
      $("#xf01").addClass('hide');
      $("#codearea").removeClass('hide');
      $("#wolive-js").addClass('hide');
      $("#frontjs").addClass('hide');
      $("#minjs").addClass('hide');
      $("#xck01").removeClass('hide');
   }
}

</script>

{include file="public/footer"/}